package com.hywood.exception;


import com.hywood.errorenum.ResultEnum;

/**
 * Created By HuJian on 2018/7/19
 */
public class BusinessException extends RuntimeException{

    private static final long serialVersionUID = 1L;

    private final Integer code;

    public BusinessException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
